package com.yunji.web.system;

import com.yunji.common.base.response.Response;
import com.yunji.common.base.response.ResponseHelper;
import com.yunji.common.model.params.EventRecordParam;
import com.yunji.common.model.vo.EventRecordVO;
import com.yunji.system.service.IEventRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@Api(tags = "事件记录")
@RestController
@RequestMapping("/system/event/")
public class SysEventController {

    @Resource
    private IEventRecordService eventRecordService;

    @ApiOperation("获取列表")
    @GetMapping(value = "list")
    public Response<List<EventRecordVO>> list(EventRecordParam param){
        return ResponseHelper.success(eventRecordService.search(param));
    }

}
